3.6.31 \(\int \frac {(i+j x) (a+b \log (c (d (e+f x)^p)^q))^2}{g+h x} \, dx\) [531]

3.6.31.1 Optimal result
3.6.31.2 Mathematica [B] (verified)
3.6.31.3 Rubi [A] (verified)
3.6.31.4 Maple [F]
3.6.31.5 Fricas [F]
3.6.31.6 Sympy [F]
3.6.31.7 Maxima [F]
3.6.31.8 Giac [F]
3.6.31.9 Mupad [F(-1)]

3.6.31.1 Optimal result

Integrand size = 33, antiderivative size = 240 \[ \int \frac {(i+j x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{g+h x} \, dx=-\frac {2 a b j p q x}{h}+\frac {2 b^2 j p^2 q^2 x}{h}-\frac {2 b^2 j p q (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )}{f h}+\frac {j (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f h}+\frac {(h i-g j) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2 \log \left (\frac {f (g+h x)}{f g-e h}\right )}{h^2}+\frac {2 b (h i-g j) p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \operatorname {PolyLog}\left (2,-\frac {h (e+f x)}{f g-e h}\right )}{h^2}-\frac {2 b^2 (h i-g j) p^2 q^2 \operatorname {PolyLog}\left (3,-\frac {h (e+f x)}{f g-e h}\right )}{h^2} \]

output
-2*a*b*j*p*q*x/h+2*b^2*j*p^2*q^2*x/h-2*b^2*j*p*q*(f*x+e)*ln(c*(d*(f*x+e)^p 
)^q)/f/h+j*(f*x+e)*(a+b*ln(c*(d*(f*x+e)^p)^q))^2/f/h+(-g*j+h*i)*(a+b*ln(c* 
(d*(f*x+e)^p)^q))^2*ln(f*(h*x+g)/(-e*h+f*g))/h^2+2*b*(-g*j+h*i)*p*q*(a+b*l 
n(c*(d*(f*x+e)^p)^q))*polylog(2,-h*(f*x+e)/(-e*h+f*g))/h^2-2*b^2*(-g*j+h*i 
)*p^2*q^2*polylog(3,-h*(f*x+e)/(-e*h+f*g))/h^2
 
3.6.31.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(852\) vs. \(2(240)=480\).

Time = 0.23 (sec) , antiderivative size = 852, normalized size of antiderivative = 3.55 \[ \int \frac {(i+j x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{g+h x} \, dx=\frac {-2 a b e h j p q+a^2 f h j x-2 a b f h j p q x+2 b^2 f h j p^2 q^2 x+2 a b e h j p q \log (e+f x)-b^2 e h j p^2 q^2 \log ^2(e+f x)-2 b^2 e h j p q \log \left (c \left (d (e+f x)^p\right )^q\right )+2 a b f h j x \log \left (c \left (d (e+f x)^p\right )^q\right )-2 b^2 f h j p q x \log \left (c \left (d (e+f x)^p\right )^q\right )+2 b^2 e h j p q \log (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )+b^2 f h j x \log ^2\left (c \left (d (e+f x)^p\right )^q\right )+a^2 f h i \log (g+h x)-a^2 f g j \log (g+h x)-2 a b f h i p q \log (e+f x) \log (g+h x)+2 a b f g j p q \log (e+f x) \log (g+h x)+b^2 f h i p^2 q^2 \log ^2(e+f x) \log (g+h x)-b^2 f g j p^2 q^2 \log ^2(e+f x) \log (g+h x)+2 a b f h i \log \left (c \left (d (e+f x)^p\right )^q\right ) \log (g+h x)-2 a b f g j \log \left (c \left (d (e+f x)^p\right )^q\right ) \log (g+h x)-2 b^2 f h i p q \log (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right ) \log (g+h x)+2 b^2 f g j p q \log (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right ) \log (g+h x)+b^2 f h i \log ^2\left (c \left (d (e+f x)^p\right )^q\right ) \log (g+h x)-b^2 f g j \log ^2\left (c \left (d (e+f x)^p\right )^q\right ) \log (g+h x)+2 a b f h i p q \log (e+f x) \log \left (\frac {f (g+h x)}{f g-e h}\right )-2 a b f g j p q \log (e+f x) \log \left (\frac {f (g+h x)}{f g-e h}\right )-b^2 f h i p^2 q^2 \log ^2(e+f x) \log \left (\frac {f (g+h x)}{f g-e h}\right )+b^2 f g j p^2 q^2 \log ^2(e+f x) \log \left (\frac {f (g+h x)}{f g-e h}\right )+2 b^2 f h i p q \log (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right ) \log \left (\frac {f (g+h x)}{f g-e h}\right )-2 b^2 f g j p q \log (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right ) \log \left (\frac {f (g+h x)}{f g-e h}\right )+2 b f (h i-g j) p q \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \operatorname {PolyLog}\left (2,\frac {h (e+f x)}{-f g+e h}\right )+2 b^2 f (-h i+g j) p^2 q^2 \operatorname {PolyLog}\left (3,\frac {h (e+f x)}{-f g+e h}\right )}{f h^2} \]

input
Integrate[((i + j*x)*(a + b*Log[c*(d*(e + f*x)^p)^q])^2)/(g + h*x),x]
 
output
(-2*a*b*e*h*j*p*q + a^2*f*h*j*x - 2*a*b*f*h*j*p*q*x + 2*b^2*f*h*j*p^2*q^2* 
x + 2*a*b*e*h*j*p*q*Log[e + f*x] - b^2*e*h*j*p^2*q^2*Log[e + f*x]^2 - 2*b^ 
2*e*h*j*p*q*Log[c*(d*(e + f*x)^p)^q] + 2*a*b*f*h*j*x*Log[c*(d*(e + f*x)^p) 
^q] - 2*b^2*f*h*j*p*q*x*Log[c*(d*(e + f*x)^p)^q] + 2*b^2*e*h*j*p*q*Log[e + 
 f*x]*Log[c*(d*(e + f*x)^p)^q] + b^2*f*h*j*x*Log[c*(d*(e + f*x)^p)^q]^2 + 
a^2*f*h*i*Log[g + h*x] - a^2*f*g*j*Log[g + h*x] - 2*a*b*f*h*i*p*q*Log[e + 
f*x]*Log[g + h*x] + 2*a*b*f*g*j*p*q*Log[e + f*x]*Log[g + h*x] + b^2*f*h*i* 
p^2*q^2*Log[e + f*x]^2*Log[g + h*x] - b^2*f*g*j*p^2*q^2*Log[e + f*x]^2*Log 
[g + h*x] + 2*a*b*f*h*i*Log[c*(d*(e + f*x)^p)^q]*Log[g + h*x] - 2*a*b*f*g* 
j*Log[c*(d*(e + f*x)^p)^q]*Log[g + h*x] - 2*b^2*f*h*i*p*q*Log[e + f*x]*Log 
[c*(d*(e + f*x)^p)^q]*Log[g + h*x] + 2*b^2*f*g*j*p*q*Log[e + f*x]*Log[c*(d 
*(e + f*x)^p)^q]*Log[g + h*x] + b^2*f*h*i*Log[c*(d*(e + f*x)^p)^q]^2*Log[g 
 + h*x] - b^2*f*g*j*Log[c*(d*(e + f*x)^p)^q]^2*Log[g + h*x] + 2*a*b*f*h*i* 
p*q*Log[e + f*x]*Log[(f*(g + h*x))/(f*g - e*h)] - 2*a*b*f*g*j*p*q*Log[e + 
f*x]*Log[(f*(g + h*x))/(f*g - e*h)] - b^2*f*h*i*p^2*q^2*Log[e + f*x]^2*Log 
[(f*(g + h*x))/(f*g - e*h)] + b^2*f*g*j*p^2*q^2*Log[e + f*x]^2*Log[(f*(g + 
 h*x))/(f*g - e*h)] + 2*b^2*f*h*i*p*q*Log[e + f*x]*Log[c*(d*(e + f*x)^p)^q 
]*Log[(f*(g + h*x))/(f*g - e*h)] - 2*b^2*f*g*j*p*q*Log[e + f*x]*Log[c*(d*( 
e + f*x)^p)^q]*Log[(f*(g + h*x))/(f*g - e*h)] + 2*b*f*(h*i - g*j)*p*q*(a + 
 b*Log[c*(d*(e + f*x)^p)^q])*PolyLog[2, (h*(e + f*x))/(-(f*g) + e*h)] +...
 
3.6.31.3 Rubi [A] (verified)

Time = 0.86 (sec) , antiderivative size = 240, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {2895, 2865, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(i+j x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{g+h x} \, dx\)

\(\Big \downarrow \) 2895

\(\displaystyle \int \frac {(i+j x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{g+h x}dx\)

\(\Big \downarrow \) 2865

\(\displaystyle \int \left (\frac {(h i-g j) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{h (g+h x)}+\frac {j \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{h}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {2 b p q (h i-g j) \operatorname {PolyLog}\left (2,-\frac {h (e+f x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{h^2}+\frac {(h i-g j) \log \left (\frac {f (g+h x)}{f g-e h}\right ) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{h^2}+\frac {j (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f h}-\frac {2 a b j p q x}{h}-\frac {2 b^2 j p q (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )}{f h}-\frac {2 b^2 p^2 q^2 (h i-g j) \operatorname {PolyLog}\left (3,-\frac {h (e+f x)}{f g-e h}\right )}{h^2}+\frac {2 b^2 j p^2 q^2 x}{h}\)

input
Int[((i + j*x)*(a + b*Log[c*(d*(e + f*x)^p)^q])^2)/(g + h*x),x]
 
output
(-2*a*b*j*p*q*x)/h + (2*b^2*j*p^2*q^2*x)/h - (2*b^2*j*p*q*(e + f*x)*Log[c* 
(d*(e + f*x)^p)^q])/(f*h) + (j*(e + f*x)*(a + b*Log[c*(d*(e + f*x)^p)^q])^ 
2)/(f*h) + ((h*i - g*j)*(a + b*Log[c*(d*(e + f*x)^p)^q])^2*Log[(f*(g + h*x 
))/(f*g - e*h)])/h^2 + (2*b*(h*i - g*j)*p*q*(a + b*Log[c*(d*(e + f*x)^p)^q 
])*PolyLog[2, -((h*(e + f*x))/(f*g - e*h))])/h^2 - (2*b^2*(h*i - g*j)*p^2* 
q^2*PolyLog[3, -((h*(e + f*x))/(f*g - e*h))])/h^2
 

3.6.31.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2865
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Sy 
mbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, 
Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunctionQ[ 
RFx, x] && IntegerQ[p]
 

rule 2895
Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_. 
)*(u_.), x_Symbol] :> Subst[Int[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], 
 c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e, f, m, 
 n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[ 
IntHide[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x]]
 
3.6.31.4 Maple [F]

\[\int \frac {\left (j x +i \right ) {\left (a +b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )\right )}^{2}}{h x +g}d x\]

input
int((j*x+i)*(a+b*ln(c*(d*(f*x+e)^p)^q))^2/(h*x+g),x)
 
output
int((j*x+i)*(a+b*ln(c*(d*(f*x+e)^p)^q))^2/(h*x+g),x)
 
3.6.31.5 Fricas [F]

\[ \int \frac {(i+j x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{g+h x} \, dx=\int { \frac {{\left (j x + i\right )} {\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}}{h x + g} \,d x } \]

input
integrate((j*x+i)*(a+b*log(c*(d*(f*x+e)^p)^q))^2/(h*x+g),x, algorithm="fri 
cas")
 
output
integral((a^2*j*x + a^2*i + (b^2*j*x + b^2*i)*log(((f*x + e)^p*d)^q*c)^2 + 
 2*(a*b*j*x + a*b*i)*log(((f*x + e)^p*d)^q*c))/(h*x + g), x)
 
3.6.31.6 Sympy [F]

\[ \int \frac {(i+j x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{g+h x} \, dx=\int \frac {\left (a + b \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}\right )^{2} \left (i + j x\right )}{g + h x}\, dx \]

input
integrate((j*x+i)*(a+b*ln(c*(d*(f*x+e)**p)**q))**2/(h*x+g),x)
 
output
Integral((a + b*log(c*(d*(e + f*x)**p)**q))**2*(i + j*x)/(g + h*x), x)
 
3.6.31.7 Maxima [F]

\[ \int \frac {(i+j x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{g+h x} \, dx=\int { \frac {{\left (j x + i\right )} {\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}}{h x + g} \,d x } \]

input
integrate((j*x+i)*(a+b*log(c*(d*(f*x+e)^p)^q))^2/(h*x+g),x, algorithm="max 
ima")
 
output
a^2*j*(x/h - g*log(h*x + g)/h^2) + a^2*i*log(h*x + g)/h + integrate((2*(i* 
q*log(d) + i*log(c))*a*b + (i*q^2*log(d)^2 + 2*i*q*log(c)*log(d) + i*log(c 
)^2)*b^2 + (b^2*j*x + b^2*i)*log(((f*x + e)^p)^q)^2 + (2*(j*q*log(d) + j*l 
og(c))*a*b + (j*q^2*log(d)^2 + 2*j*q*log(c)*log(d) + j*log(c)^2)*b^2)*x + 
2*((i*q*log(d) + i*log(c))*b^2 + a*b*i + ((j*q*log(d) + j*log(c))*b^2 + a* 
b*j)*x)*log(((f*x + e)^p)^q))/(h*x + g), x)
 
3.6.31.8 Giac [F]

\[ \int \frac {(i+j x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{g+h x} \, dx=\int { \frac {{\left (j x + i\right )} {\left (b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a\right )}^{2}}{h x + g} \,d x } \]

input
integrate((j*x+i)*(a+b*log(c*(d*(f*x+e)^p)^q))^2/(h*x+g),x, algorithm="gia 
c")
 
output
integrate((j*x + i)*(b*log(((f*x + e)^p*d)^q*c) + a)^2/(h*x + g), x)
 
3.6.31.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(i+j x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{g+h x} \, dx=\int \frac {\left (i+j\,x\right )\,{\left (a+b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )\right )}^2}{g+h\,x} \,d x \]

input
int(((i + j*x)*(a + b*log(c*(d*(e + f*x)^p)^q))^2)/(g + h*x),x)
 
output
int(((i + j*x)*(a + b*log(c*(d*(e + f*x)^p)^q))^2)/(g + h*x), x)